﻿using System;
using SharpSqlAnalyzer.nodes;
using SharpSqlAnalyzer.nodes.mdx;

namespace SharpSqlAnalyzer.stmt.mdx
{
	// Token: 0x02000199 RID: 409
	public class TMdxCreateSubCube : TCustomSqlStatement
	{
		// Token: 0x06000E1A RID: 3610 RVA: 0x00309716 File Offset: 0x00307916
		public TMdxCreateSubCube(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.sstmdxcreatesubcube;
		}

		// Token: 0x06000E1B RID: 3611 RVA: 0x0030972C File Offset: 0x0030792C
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			base.doParseStatement(psql);
			this.createSubCubeNode = (TMdxCreateSubCubeNode)this.rootNode;
			this.subQuery = new TMdxSelect(EDbVendor.dbvmdx);
			this.subQuery.rootNode = this.createSubCubeNode.SelectNode;
			this.subQuery.doParseStatement(this);
			return 0;
		}

		// Token: 0x17000290 RID: 656
		// (get) Token: 0x06000E1C RID: 3612 RVA: 0x0030978D File Offset: 0x0030798D
		public virtual TMdxIdentifierNode CubeName
		{
			get
			{
				return this.createSubCubeNode.CubeName;
			}
		}

		// Token: 0x17000291 RID: 657
		// (get) Token: 0x06000E1D RID: 3613 RVA: 0x0030979A File Offset: 0x0030799A
		public virtual TMdxSelect SubQuery
		{
			get
			{
				return this.subQuery;
			}
		}

		// Token: 0x06000E1E RID: 3614 RVA: 0x003097A2 File Offset: 0x003079A2
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06000E1F RID: 3615 RVA: 0x003097B2 File Offset: 0x003079B2
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			this.subQuery.acceptChildren(v);
			v.postVisit(this);
		}

		// Token: 0x04001325 RID: 4901
		private TMdxCreateSubCubeNode createSubCubeNode;

		// Token: 0x04001326 RID: 4902
		private TMdxSelect subQuery;
	}
}
